# 判断字符串是否是回文
# 5%abcCb#A5  -->提取出里面的数字和字母，不区分大小写从左至右和从右到左看起来一样，那就是回文
# 5abcCbA5 --》回文
str1 = input("please input string:")
str2 = ''.join([i for i in str1 if i.isalnum()])
# str2 = ''
# for i in str1:
#     if i.isalnum():
#         str2 = str2 + i
str3 = str2.upper()
str4 = str3[::-1]
if str3 == str4:
    print("该字符串是回文")
else:
    print("该字符串不是回文")
